import java.util.Scanner;

public class demo01 {
    //不用加减乘除做加法
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.nextLine();
        String[] arr=str.split(",");
        int n1=Integer.parseInt(arr[0]);
        int n2=Integer.parseInt(arr[1]);
        int sum=Add(n1,n2);
        System.out.println(sum);
    }
    public static int Add(int n1,int n2) {
        while (n2!=0){
            int num1=n1^n2;
            int num2=(n1&n2)<<1;
            n1=num1;
            n2=num2;
        }
        return n1;
    }
}